Skip to content

ci: unbind the Dagster deploy from the production environment - #859

Merged
jirhiker merged 1 commit into
stagingfrom
ci/gate-production-data-migrations
Aug 19, 2026
Merged

ci: unbind the Dagster deploy from the production environment#859
jirhiker merged 1 commit into
stagingfrom
ci/gate-production-data-migrations

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Settings change, already applied

The production GitHub environment now requires review from the deployers
team, with self-review prevented:

{"type":"required_reviewers","reviewers":["deployers"],"prevent_self_review":true}

So applying a data migration to production takes two people. Irreversibility is
the reason — a migration that deletes rows has no downgrade, only a restore.
deployers has four members, so requiring a second person will not deadlock.

Why this code change goes with it

That environment is shared by three workflows. The gate now also covers
production API releases (CD_production.yml), which is intended: release-please
already makes releasing a decision, and this adds one approval to it.

It would also have covered CD_dagster_prod.yml, which is not intended.
That job reads only repository-level DAGSTER_CLOUD_API_TOKEN and
DAGSTER_CLOUD_ORGANIZATION_ID — none of the environment's secrets — and since
it was retargeted it runs on every push to staging touching the code
location. Binding it would have put an approval gate on routine merges: a gate
on the wrong thing, since it publishes code rather than data.

Verified before removing it that the job consumes nothing environment-scoped.
The environment's own secrets (CLOUD_SQL_*, deploy service account keys,
SESSION_SECRET_KEY) remain in use by the two workflows that need them.

Effect

workflow gated now?
Data Migrations → production yes
CD_production.yml (API release) yes
CD_dagster_prod.yml (code location) no
Data Migrations → staging no

🤖 Generated with Claude Code

The `production` GitHub environment now requires review from the deployers
team, with self-review prevented, so applying a data migration to production
takes two people. Irreversibility is the reason: a migration that deletes rows
has no downgrade, only a restore.

That environment is shared, so the gate also covers production API releases,
which is intended -- release-please already makes releasing a decision, and this
adds one approval to it.

It would also have covered the Dagster code location deploy, which is not
intended. That job reads only repository-level DAGSTER_CLOUD_API_TOKEN and
DAGSTER_CLOUD_ORGANIZATION_ID, none of the environment's secrets, and it runs on
every push to staging touching the code location. Binding it would have put an
approval gate on routine merges -- a gate on the wrong thing, since it publishes
code rather than data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

77.96% total — gate is 75%.

@jirhiker
jirhiker merged commit d7e6cb6 into staging Aug 19, 2026
9 checks passed
@jirhiker
jirhiker deleted the ci/gate-production-data-migrations branch August 19, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant